﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QLKHO.Class;

namespace QLKHO.Forms
{
    public partial class frmBaoCaoXuatNhapTonKho : Form
    {
        public frmBaoCaoXuatNhapTonKho()
        {
            InitializeComponent();
        }

        private void frmBaoCaoXuatNhapTonKho_Load(object sender, EventArgs e)
        {
            
            // TODO: This line of code loads data into the 'qLKHODataSet_error.proc_baocaoxuatnhaptonkho' table. You can move, or remove it, as needed.
            
         }

        private void butIn_Click(object sender, EventArgs e)
        {
            string strSQL = "ALTER proc [dbo].[proc_baocaoxuatnhaptonkho] as exec proc_reportxuatnhaptonkho " + "'" + dtpFrom.Value.ToShortDateString() + "','" + dtpTo.Value.ToShortDateString() + "'";
            ADODB.Recordset Rs = new ADODB.Recordset();
            Rs.Open(strSQL, clsMain.flexConn.fcConn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic, -1);
            this.proc_baocaoxuatnhaptonkhoTableAdapter.Fill(this.qLKHODataSet_error.proc_baocaoxuatnhaptonkho);
            this.reportViewer1.RefreshReport();
        }
    }
}
